Skip to main content

All Questions

0votes
0answers
222views

Redirect to page with form fields filled

I have two models in my application: class User < ActiveRecord::Base has_many :telephones end class Telephone < ActiveRecord::Base belongs_to :user end and in my form to user i have user'...
Jhonatan Martins's user avatar
0votes
0answers
192views

In Rails, how can I create new records in a nested form?

I have a nested form consisting of a parent model, Challenge, and a child model ChallengeRoster. In the edit page of a Challenge I can currently edit/update attributes of the Challenge, and can edit/...
daveomcd's user avatar
0votes
1answer
56views

Beginner trouble with Rails form

I'm using Rails 3.2. I'm trying to make a form that allows the user to input the Colleges that they want to compare, and the criteria for which they want to see compared. Here's my code. When I ...
Adam Zerner's user avatar
0votes
1answer
122views

Don't understan how to implement simple_form create action

Note: I'm using Rails 3.2 I'm trying to implement a simple_form by following this sample code: https://github.com/rafaelfranca/simple_form-bootstrap/blob/master/app/controllers/articles_controller.rb....
Adam Zerner's user avatar
0votes
1answer
539views

update attributes in dynamic form rails

I have dynamic form with conditional attributes. E.g. if radio button "condition1" is checked, when "price" field hides dynamically via jQuery, and "percentage" field appears. Let's say I created ...
Ilya Cherevkov's user avatar
2votes
2answers
199views

Rails 3.2.12 select second element in a form dependant on first collection_select's choice

I have a Venue and an Event Model. Venue has_many :events and Event belongs_to :venue. My Venue's have a :venue_name and a :address. My Event's hava an arrangement of attributes and both :...
samuelkobe's user avatar
1vote
1answer
171views

Rails ajax star rating not returning rating on initial update

I'm trying to create an AJAX star rating form on my site. Using the tutorial found on this site, I managed to get close. However, whenever I try to submit an update to the rating form, by clicking ...
dnyce's user avatar
0votes
1answer
217views

:disabled => true & :disabled => "disabled" don't make collection_select disabled in rails

This is my collection_select : <%= f.collection_select(:country_id, {}, :id, {}, :prompt => 'Select Country First', :disabled => 'disabled') %> adding :disabled => true / :disabled =>...
Ajay's user avatar
  • 4,251
1vote
0answers
84views

Using form, save :member_id, :group_id and :content to GroupMessage model

(What I would like to do) Using form, I would like to save some data into GroupMessage model and at the same time, to show the group message on the page where I filled in the form(groups/show?id=). (...
Kuniharu Aramaki's user avatar
5votes
2answers
3kviews

Set Default Classes For Submit Button In Simple Form

I'm using Simple Form with Rails 3.2. I'm currently adding the same classes to the submit button of each form within my app. There are a lot of forms so this isn't very DRY. <%= f.button :submit, ...
Undistraction's user avatar
0votes
1answer
170views

Rails - adding a string in front of a form parameter

I am at a lost and cannot seem to find a solution anywhere for this... all i want to do is be able to add a little greeting in front of my user's name when they submit a form via an external API...so ...
user1502223's user avatar
0votes
2answers
193views

Best Practice for Creating a Modular Form Spanning Several Different Layouts

I'm a RoR newbie (v3.2.13), and I'm building a new site/application that has a lot of landing pages, divided into 6-8 different layouts. The layouts are using similar elements in a changing order, so ...
CodeBender's user avatar
2votes
1answer
2kviews

Rails: form_for with field for Hash

i've got model with: class Product < ActiveRecord::Base attr_accessible :category, :description, :img_url, :name, :price, :quantity, :tags serialize :tags, Hash end and try to make form for ...
Filip Bartuzi's user avatar
0votes
1answer
219views

Rails: dynamically changing form content

I am building message app in rails where user can send message from templates. I have a database of templates, and the user can select templates as per category. In my message model, I want to render ...
user2206724's user avatar
0votes
1answer
69views

rails 3 mass assignment error, simple yet unresolvable

I have been trying to figure out why I keep receiving mass-assignment errors when my code seems to be correct. Am I using the wrong syntax? I would really appreciate any beta, I have been trying to ...
godzilla3000's user avatar

153050per page
close